package com.huang.weic.controller;

import com.huang.weic.bean.Food;
import com.huang.weic.bean.Play;
import com.huang.weic.service.FoodService;
import com.huang.weic.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/food")
@RestController
public class FoodController {
    @Autowired
    private FoodService foodService;
    @GetMapping("/foodList")
    public R getList(){
        List<Food> foodList= foodService.selectList();
        return R.ok().data("foodList",foodList);
    }

}
